#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dominion.h"

void testCouncilRoom(){
	int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};
	
	struct gameState *game = newGame();
	initializeGame(3, k, 10, game);
	struct gameState *test = malloc(sizeof(struct gameState));
	memcpy(test, game, sizeof(struct gameState));
	int coin = 0;
	cardEffect(council_room, 0, 0, 0, test, 0, &coin);
	if(test->handCount[test->whoseTurn] == game->handCount[test->whoseTurn]+3)
		printf("council room: PASS Cards Drawn\n");
	else
		printf("council room: FAIL Cards Not Drawn\n");
	
	if(test->numBuys == game->numBuys+1)
		printf("council room: PASS 1 buy added \n");
	else
		printf("council room: FAIL one buy should be added\n");
		
	if(test->numActions == game->numActions)
		printf("council room: PASS No Actions Added\n");
	else
		printf("council room: FAIL No Actions Added\n");	
	int i;
	for(i= 0; i < game->numPlayers; ++i){
		if(i == test->whoseTurn) continue;
		if(test->handCount[i] == game->handCount[i]+1)
			printf("concil room: PASS card added to %d players hand\n", i);
		else
			printf("concil room: FAIL card not added to %d players hand\n", i);
	}
	
}



int main(int argc, char *argv[]){
    testCouncilRoom();
    return 0;
}



